import React,{Suspense} from "react";
import ReactDOM from "react-dom/client";
import { HashRouter } from "react-router-dom";
// REM
import "lib-flexible";
// 样式
import "./assets/reset.min.css";
import "./index.less";
import App from "./App";
import store from "./store";
import { Provider } from "react-redux";
// 处理最大宽度
(function () {
  const handleMax = function handleMax() {
    let html = document.documentElement,
      root = document.getElementById("root"),
      deviceW = html.clientWidth;
    root.style.maxWidth = "750px";
    if (deviceW >= 750) {
      html.style.fontSize = "75px";
    }
  };
  handleMax();
})();

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  // <Suspense>
    <Provider store={store}>
      <HashRouter>
        <App />
      </HashRouter>
    </Provider>
  // </Suspense>
);
